package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.SysComponentMapper;
import com.ruoyi.business.domain.SysComponent;
import com.ruoyi.business.service.ISysComponentService;

/**
 * 系统级组件(原子组件)Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-18
 */
@Service
public class SysComponentServiceImpl implements ISysComponentService 
{
    @Autowired
    private SysComponentMapper sysComponentMapper;

    /**
     * 查询系统级组件(原子组件)
     * 
     * @param id 系统级组件(原子组件)主键
     * @return 系统级组件(原子组件)
     */
    @Override
    public SysComponent selectSysComponentById(Long id)
    {
        return sysComponentMapper.selectSysComponentById(id);
    }

    /**
     * 查询系统级组件(原子组件)列表
     * 
     * @param sysComponent 系统级组件(原子组件)
     * @return 系统级组件(原子组件)
     */
    @Override
    public List<SysComponent> selectSysComponentList(SysComponent sysComponent)
    {
        return sysComponentMapper.selectSysComponentList(sysComponent);
    }

    /**
     * 新增系统级组件(原子组件)
     * 
     * @param sysComponent 系统级组件(原子组件)
     * @return 结果
     */
    @Override
    public int insertSysComponent(SysComponent sysComponent)
    {
        sysComponent.setCreateTime(DateUtils.getNowDate());
        return sysComponentMapper.insertSysComponent(sysComponent);
    }

    /**
     * 修改系统级组件(原子组件)
     * 
     * @param sysComponent 系统级组件(原子组件)
     * @return 结果
     */
    @Override
    public int updateSysComponent(SysComponent sysComponent)
    {
        sysComponent.setUpdateTime(DateUtils.getNowDate());
        return sysComponentMapper.updateSysComponent(sysComponent);
    }

    /**
     * 批量删除系统级组件(原子组件)
     * 
     * @param ids 需要删除的系统级组件(原子组件)主键
     * @return 结果
     */
    @Override
    public int deleteSysComponentByIds(Long[] ids)
    {
        return sysComponentMapper.deleteSysComponentByIds(ids);
    }

    /**
     * 删除系统级组件(原子组件)信息
     * 
     * @param id 系统级组件(原子组件)主键
     * @return 结果
     */
    @Override
    public int deleteSysComponentById(Long id)
    {
        return sysComponentMapper.deleteSysComponentById(id);
    }
}
